.nav-title{font-family:Roboto Slab,serif}

*, :before, :after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

:before, :after {
  --tw-content: "";
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  margin: 0;
  line-height: inherit;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b, strong {
  font-weight: bolder;
}

pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  font-size: 1em;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, [type="button"] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

/* Base classes */
.hidden {
  display: none;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.grid {
  display: grid;
}

.h-screen {
  height: 100vh;
}

.h-full {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.h-auto {
  height: auto;
}

.w-full {
  width: 100%;
}

.w-8 {
  width: 2rem;
}

.w-4 {
  width: 1rem;
}

.w-3\.5 {
  width: 0.875rem;
}

.w-3 {
  width: 0.75rem;
}

.w-28 {
  width: 7rem;
}

.w-64 {
  width: 16rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-x-1 {
  column-gap: 0.25rem;
}

.gap-x-2 {
  column-gap: 0.5rem;
}

.gap-x-3 {
  column-gap: 0.75rem;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.375rem * var(--tw-space-y-reverse));
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-full {
  border-radius: 9999px;
}

.border {
  border-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-r {
  border-right-width: 1px;
}

.border-gray-200 {
  --tw-border-opacity: 1;
  border-color: rgb(229 231 235 / var(--tw-border-opacity));
}

.border-transparent {
  border-color: transparent;
}

.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

.bg-gray-100 {
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}

.bg-blue-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(37 99 235 / var(--tw-bg-opacity));
}

.bg-green-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(22 163 74 / var(--tw-bg-opacity));
}

.p-4 {
  padding: 1rem;
}

.p-2 {
  padding: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-7 {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.pb-12 {
  padding-bottom: 3rem;
}

.pr-4 {
  padding-right: 1rem;
}

.pl-7 {
  padding-left: 1.75rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-bold {
  font-weight: 700;
}

.text-gray-700 {
  --tw-text-opacity: 1;
  color: rgb(55 65 81 / var(--tw-text-opacity));
}

.text-gray-800 {
  --tw-text-opacity: 1;
  color: rgb(31 41 55 / var(--tw-text-opacity));
}

.text-gray-600 {
  --tw-text-opacity: 1;
  color: rgb(75 85 99 / var(--tw-text-opacity));
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
}

.text-slate-700 {
  --tw-text-opacity: 1;
  color: rgb(51 65 85 / var(--tw-text-opacity));
}

.text-green-600 {
  --tw-text-opacity: 1;
  color: rgb(22 163 74 / var(--tw-text-opacity));
}

.shadow-sm {
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.15s;
}

.duration-300 {
  transition-duration: 0.3s;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.-translate-x-full {
  --tw-translate-x: -100%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:bg-gray-100:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}

.hover\:bg-blue-500:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}

.focus\:border-blue-500:focus {
  --tw-border-opacity: 1;
  border-color: rgb(59 130 246 / var(--tw-border-opacity));
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-blue-500:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
}

.focus\:ring-offset-2:focus {
  --tw-ring-offset-width: 2px;
}

.focus\:ring-offset-white:focus {
  --tw-ring-offset-color: #fff;
}

.focus\:z-10:focus {
  z-index: 10;
}

.z-\[60\] {
  z-index: 60;
}

.overflow-y-auto {
  overflow-y: auto;
}

.bottom-px {
  bottom: 1px;
}

.inset-x-px {
  left: 1px;
  right: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-auto {
  margin-top: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .dark\:bg-slate-900 {
    --tw-bg-opacity: 1;
    background-color: rgb(15 23 42 / var(--tw-bg-opacity));
  }
  
  .dark\:bg-slate-800 {
    --tw-bg-opacity: 1;
    background-color: rgb(30 41 59 / var(--tw-bg-opacity));
  }
  
  .dark\:border-gray-700 {
    --tw-border-opacity: 1;
    border-color: rgb(55 65 81 / var(--tw-border-opacity));
  }
  
  .dark\:text-gray-400 {
    --tw-text-opacity: 1;
    color: rgb(156 163 175 / var(--tw-text-opacity));
  }
  
  .dark\:text-white {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity));
  }
  
  .dark\:text-slate-400 {
    --tw-text-opacity: 1;
    color: rgb(148 163 184 / var(--tw-text-opacity));
  }
  
  .dark\:hover\:bg-gray-900:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(17 24 39 / var(--tw-bg-opacity));
  }
  
  .dark\:hover\:text-slate-300:hover {
    --tw-text-opacity: 1;
    color: rgb(203 213 225 / var(--tw-text-opacity));
  }
  
  .dark\:hover\:text-white:hover {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity));
  }
  
  .dark\:focus\:ring-offset-gray-800:focus {
    --tw-ring-offset-color: #1f2937;
  }
}

/* Responsive */
@media (min-width: 640px) {
  .sm\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .sm\:gap-x-4 {
    column-gap: 1rem;
  }
  
  .sm\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:block {
    display: block;
  }
  
  .lg\:hidden {
    display: none;
  }
  
  .lg\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .lg\:py-14 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  
  .lg\:pl-64 {
    padding-left: 16rem;
  }
  
  .lg\:translate-x-0 {
    --tw-translate-x: 0px;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  }
}

/* Custom classes for our components */
.user-message {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 80%;
  background-color: #f3f4f6;
}

.agent-message {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 80%;
  background-color: #dbeafe;
}

.training-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.training-data-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.training-data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #1e293b;
}

.training-data-table tr:last-child td {
  border-bottom: none;
}

.training-data-table tr:hover td {
  background-color: #f8fafc;
}

/* Delete button styling */
.remove-training-data-btn, .delete-btn {
  background-color: white;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.remove-training-data-btn:hover, .delete-btn:hover {
  background-color: #fee2e2;
  border-color: #ef4444;
}

.paginate-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.paginate-buttons button {
  padding: 0.25rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Training data modal styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 40rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #6b7280;
}

.radio-group {
  margin-bottom: 1.5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.radio-option input[type="radio"] {
  margin-top: 0.25rem;
  margin-right: 0.75rem;
}

.radio-label {
  display: flex;
  flex-direction: column;
}

.radio-label-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.radio-label-description {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Button styling */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

/* Scrollbar styling */
.scrollbar-y {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.scrollbar-y::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-y::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-y::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 20px;
}

/* Message container styling */
#message-container {
  padding: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 16rem);
}

/* Message styling */
.message {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message-user {
  background-color: #f3f4f6;
  margin-left: auto;
  margin-right: 1.5rem;
  max-width: 80%;
}

.message-agent {
  background-color: #f0f9ff;
  margin-right: auto;
  margin-left: 1.5rem;
  max-width: 80%;
  border-left: 4px solid #3b82f6;
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.message-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.message-avatar svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #3b82f6;
}

.message-name {
  font-weight: 600;
  color: #1e293b;
}

.sql-message {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  background-color: #f8fafc;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  white-space: pre-wrap;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
  margin: 1rem 0;
  color: #334155;
}

.code-block {
  background-color: #f1f5f9;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Suggested question button styling */
.suggested-questions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  justify-content: center;
}

.suggested-question-btn {
  background-color: #f0f9ff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid #e0f2fe;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.suggested-question-btn:hover {
  background-color: #e0f2fe;
  border-color: #bae6fd;
  transform: translateY(-1px);
}

/* Training form styling */
.training-form {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1rem;
}

.training-form input,
.training-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.training-form button {
  padding: 0.5rem 1.5rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.training-form button:hover {
  background-color: #2563eb;
}

/* Table visualization styling */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
}

.data-table {
  min-width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.data-table th {
  background-color: #f9fafb;
  font-weight: 600;
}

.data-table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* CSV download button */
.csv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: white;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.csv-download-btn:hover {
  background-color: #f9fafb;
}

/* Action buttons for the chat */
.action-button {
  padding: 0.5rem 1rem;
  background-color: #f9fafb;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  margin-right: 0.5rem;
}

.action-button.primary {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.action-button:hover {
  background-color: #f3f4f6;
}

.action-button.primary:hover {
  background-color: #2563eb;
}

/* Graph visualizations */
.plot-container {
  margin-top: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  overflow: hidden;
}

/* Dark mode specific styles */
@media (prefers-color-scheme: dark) {
  .user-message {
    background-color: #1e293b;
    color: #f9fafb;
  }

  .agent-message {
    background-color: #0f172a;
    color: #f9fafb;
  }

  .sql-message {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
  }

  .code-block {
    background-color: #1e293b;
    color: #e2e8f0;
  }
  
  .suggested-question-btn {
    background-color: #0f172a;
    color: #f9fafb;
    border-color: #1e293b;
  }

  .suggested-question-btn:hover {
    background-color: #1e293b;
    border-color: #334155;
  }

  .training-data-table th {
    background-color: #1e293b;
    color: #f9fafb;
  }

  .training-data-table td {
    border-color: #334155;
  }

  .data-table th {
    background-color: #1e293b;
    color: #f9fafb;
  }

  .data-table tr:nth-child(even) {
    background-color: #0f172a;
  }

  .data-table td {
    border-color: #334155;
  }

  .training-form input,
  .training-form textarea {
    background-color: #1e293b;
    color: #f9fafb;
    border-color: #334155;
  }
  
  .modal-content {
    background-color: #0f172a;
    color: #f9fafb;
  }
  
  .remove-training-data-btn, .delete-btn {
    background-color: #1e293b;
    color: #f87171;
  }
  
  .remove-training-data-btn:hover, .delete-btn:hover {
    background-color: #282f3e;
  }
  
  .csv-download-btn, .action-button {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
  }
  
  .csv-download-btn:hover, .action-button:hover {
    background-color: #282f3e;
  }
  
  .action-button.primary {
    background-color: #2563eb;
    border-color: #2563eb;
  }
  
  .action-button.primary:hover {
    background-color: #1d4ed8;
  }
}

/* Add better typography for headings */
h1, h2, h3 {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.welcome-heading {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.welcome-subtitle {
  color: #64748b;
  margin-bottom: 2rem;
}

/* Improve sidebar styling */
#application-sidebar {
  box-shadow: 1px 0 10px rgba(0, 0, 0, 0.05);
  background-color: #fff;
  border-right: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
}

#application-sidebar .sidebar-header {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

#application-sidebar .sidebar-logo {
  height: 2rem;
}

/* Question history items in sidebar */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #475569;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  margin: 0.25rem 0.75rem;
  transition: all 0.2s;
  text-align: left;
  width: calc(100% - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.sidebar-nav-item.active {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}

.sidebar-nav-item svg {
  min-width: 16px;
  width: 16px;
  height: 16px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-bottom {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9;
}

/* Connected status */
.connection-status {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: #10b981;
}

.connection-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #10b981;
  margin-right: 0.5rem;
}

/* Improve question input area */
#input-area {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Question input styling */
#question-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  padding-bottom: 3rem;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  background-color: #fff;
  color: #1e293b;
}

#question-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.input-container {
  position: relative;
  margin-bottom: 1rem;
}

.input-actions {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0.75rem;
  display: flex;
  align-items: center;
}

#send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

#send-button:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

#send-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  #question-input {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }
  
  #question-input::placeholder {
    color: #94a3b8;
  }
}

/* More appealing tables */
.training-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.training-data-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.training-data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #1e293b;
}

.training-data-table tr:last-child td {
  border-bottom: none;
}

.training-data-table tr:hover td {
  background-color: #f8fafc;
}

/* Improve the look of code containers */
.sql-message {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  background-color: #f8fafc;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  white-space: pre-wrap;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
  margin: 1rem 0;
  color: #334155;
}

/* Improved message styling */
.message {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message-user {
  background-color: #f3f4f6;
  margin-left: auto;
  margin-right: 1.5rem;
  max-width: 80%;
}

.message-agent {
  background-color: #f0f9ff;
  margin-right: auto;
  margin-left: 1.5rem;
  max-width: 80%;
  border-left: 4px solid #3b82f6;
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.message-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.message-avatar svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #3b82f6;
}

.message-name {
  font-weight: 600;
  color: #1e293b;
}

/* Better buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
}

.btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.btn-secondary {
  background-color: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

/* Suggested question styling */
.suggested-questions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  justify-content: center;
}

.suggested-question-btn {
  background-color: #f0f9ff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid #e0f2fe;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.suggested-question-btn:hover {
  background-color: #e0f2fe;
  border-color: #bae6fd;
  transform: translateY(-1px);
}

/* Better data visualization */
.data-visualization {
  background-color: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 1.5rem 0;
}

.data-visualization-header {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #1e293b;
}

.data-visualization-content {
  padding: 1rem;
}

/* Remove button styling */
.remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background-color: #fff;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.remove-btn:hover {
  background-color: #fee2e2;
  color: #dc2626;
  border-color: #ef4444;
  transform: translateY(-1px);
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
  h1, h2, h3 {
    color: #f8fafc;
  }
  
  .welcome-subtitle {
    color: #94a3b8;
  }
  
  #application-sidebar {
    background-color: #0f172a;
    border-right: 1px solid #1e293b;
  }
  
  #application-sidebar .sidebar-header {
    border-bottom: 1px solid #1e293b;
  }
  
  .sidebar-nav-item {
    color: #94a3b8;
  }
  
  .sidebar-nav-item:hover {
    background-color: #1e293b;
    color: #f8fafc;
  }
  
  .sidebar-nav-item.active {
    background-color: #0c4a6e;
    color: #e0f2fe;
  }
  
  .sidebar-section {
    border-bottom: 1px solid #1e293b;
  }
  
  .sidebar-section-title {
    color: #94a3b8;
  }
  
  .sidebar-bottom {
    border-top: 1px solid #1e293b;
  }
  
  #question-input {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
  }
  
  #question-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }
  
  .training-data-table {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .training-data-table th {
    background-color: #1e293b;
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
  }
  
  .training-data-table td {
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
  }
  
  .training-data-table tr:hover td {
    background-color: #0f172a;
  }
  
  .sql-message {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
  }
  
  .message {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .message-user {
    background-color: #1e293b;
  }
  
  .message-agent {
    background-color: #0f172a;
    border-left: 4px solid #3b82f6;
  }
  
  .message-avatar {
    background-color: #075985;
  }
  
  .message-avatar svg {
    color: #e0f2fe;
  }
  
  .message-name {
    color: #f1f5f9;
  }
  
  .btn-secondary {
    background-color: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
  }
  
  .btn-secondary:hover {
    background-color: #334155;
    border-color: #475569;
  }
  
  .data-visualization {
    background-color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .data-visualization-header {
    border-bottom: 1px solid #1e293b;
    color: #f1f5f9;
  }
  
  .remove-btn {
    background-color: #1e293b;
    color: #f87171;
    border-color: #7f1d1d;
  }
  
  .remove-btn:hover {
    background-color: #450a0a;
    color: #fca5a5;
  }
}

/* Form styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #4b5563;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-control.is-invalid {
  border-color: #ef4444;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Optional field label */
.optional-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: normal;
  margin-left: 0.5rem;
}

/* Form card styling */
.form-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-card-header {
  margin-bottom: 1.5rem;
}

.form-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.form-card-subtitle {
  color: #64748b;
  font-size: 0.875rem;
}

/* Form buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn-submit {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-submit:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-cancel {
  background-color: white;
  color: #4b5563;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  margin-right: 1rem;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background-color: #f3f4f6;
}

/* Training data add form */
.training-data-form {
  max-width: 800px;
  margin: 0 auto;
}

/* Make all fields appear as optional */
.training-data-field {
  border-color: #d1d5db !important;
  background-color: #fff;
}

.training-data-field:focus {
  border-color: #3b82f6 !important;
}

.training-data-section {
  margin-bottom: 2rem;
}

.training-data-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

.training-data-section-description {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Dark mode for forms */
@media (prefers-color-scheme: dark) {
  .form-label {
    color: #e2e8f0;
  }
  
  .optional-label {
    color: #94a3b8;
  }
  
  .form-control {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }
  
  .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }
  
  .form-control.is-invalid {
    border-color: #ef4444;
  }
  
  .form-card {
    background-color: #0f172a;
  }
  
  .form-card-title {
    color: #f1f5f9;
  }
  
  .form-card-subtitle {
    color: #94a3b8;
  }
  
  .btn-cancel {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
  }
  
  .btn-cancel:hover {
    background-color: #334155;
  }
  
  .training-data-section-title {
    color: #f1f5f9;
  }
  
  .training-data-section-description {
    color: #94a3b8;
  }
  
  .training-data-field {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9;
  }
}

/* Question history container scrolling */
#question-history {
  overflow-y: auto;
  max-height: calc(100vh - 200px); /* Increase height for more content */
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* Reduce gap between items */
}

/* Make history items more compact */
.history-question.sidebar-nav-item {
  padding: 0.5rem 0.75rem; /* Reduce padding */
  margin: 0.1rem 0.5rem; /* Reduce margin */
  min-height: 0; /* Remove min-height restriction */
  font-size: 0.8rem; /* Slightly smaller font */
  line-height: 1.2; /* Tighter line height */
  border-radius: 0.25rem; /* Smaller border radius */
  max-height: 2.4rem; /* Limit the height */
}

.sidebar-nav-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  max-width: 160px; /* Control max width */
}

.question-history-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* Critical for flexbox scrolling */
  overflow: hidden;
  padding-bottom: 1rem;
}

/* Fix sidebar layout to maximize space for history */
#application-sidebar ul.space-y-1\.5 {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem; /* Reduce padding */
  margin: 0; /* Remove margin */
  gap: 0.25rem;
}

/* Optimize the overall sidebar structure */
#application-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0;
}

#application-sidebar .hs-accordion-group {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

/* Ensure the history section title takes minimal space */
.text-xs.text-gray-500.uppercase.mb-2.px-3 {
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
} 